package com.tjbklx1.pattern.flyweight.demo2;

public class Client {
	public static void main(String[] args) {
		initObjectPool();
		SignInfo signInfo = SignInfoFactory.getSignInfo("科目1考试地点1");
	}

	/**
	 *  初始化对象池
	 */
	private static void initObjectPool() {
		// 初始化对象池
		for (int i = 0; i < 4; i++) {
			String subject = "科目" + i;
			// 初始化地址
			for (int j = 0; j < 5; j++) {
				String key = subject + "考试地点" + j;
				SignInfoFactory.getSignInfo(key);
			}
		}
	}
}